<div class="ui menu">
    <span class="active item">用户</span>
</div>
<table class="ui table segment">
    <thead>
        <tr>
            <th>工号</th>
            <th>用户名</th>
            <th>名字</th>
            <th>邮件</th>
            <th ng-show="isRoot">用户组</th>
            <th ng-show="isRoot">编辑</th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="user in users">
            <td>{{user.workno}}</td>
            <td>{{user.username}}</td>
            <td>{{user.name}}</td>
            <td>{{user.email}}</td>
            <td ng-show="isRoot">{{user.group.name}}</td>
            <td ng-show="isRoot">
                <a href="#!/user/edit/{{user._id}}" class="ui button tiny compact">编辑</a>
                <a ng-click="deleteUser(user._id)" class="ui button icon tiny compact">
                    <i class="remove icon"></i>
                </a>
            </td>
            </ng-show>
        </tr>
    </tbody>
</table>
<a ng-show="isRoot" href="#!/user/add" class="ui blue submit button icon">
    <i class="edit basic icon"></i> 添加用户
</a>